/*
 * @Date         : 2022-06-07 19:57:32
 * @LastEditors  : zu1662
 * @LastEditTime : 2022-07-20 11:07:38
 * @Description  : 测试模块
 * 
 * Copyright © 2022 by zu1662, All Rights Reserved. 
 */
import { Controller, Get, VERSION_NEUTRAL } from "@nestjs/common";
import { UserAgent } from "src/utils/request/request.decorator";
import { Response } from "src/utils/response/response.decorator";
import { IResponse } from "src/utils/response/response.interface";
import { IResult } from "ua-parser-js";

@Controller({
  version: VERSION_NEUTRAL,
})
export class TestingController {
  @Response("test.hello")
  @Get("/")
  async hello(@UserAgent() userAgent: IResult): Promise<IResponse> {
    return { userAgent };
  }
}
